package com.example.jikeyoujikeyou.office_sz.model.base;

/*CREATE TABLE `staff` (
  `id` char(18) NOT NULL,
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '员工姓名',
  `phone` varchar(11) DEFAULT '' COMMENT '手机号码',
  `password` varchar(30) DEFAULT '' COMMENT '登录密码',
  `company_id` char(18) NOT NULL DEFAULT '' COMMENT '公司ID',
  `department_id` char(18) NOT NULL DEFAULT '' COMMENT '部门ID',
  `title` varchar(255) DEFAULT NULL COMMENT '职位',
  `category` int(255) DEFAULT '2' COMMENT '''用户类别，0-超级管理员;1-部门管理员；2-普通用户'',',
  `status` int(11) DEFAULT '1' COMMENT '''用户状态，0表示禁用，1表示正常，2表示离职'',',
  `token` char(255) DEFAULT '' COMMENT '请求令牌',
  `create_time` timestamp DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工信息表';*/

public class BaseStaff extends BaseModel {

    public static final Integer SUPER_ADMINISTRATOR = 0;
    public static final Integer DEPARMENT_ADMINISTRATOR = 1;
    public static final Integer USER = 2;

    public static final Integer DISABLE = 0;
    public static final Integer ENABLE = 1;
    public static final Integer RETIRED = 2;

    public BaseStaff() {
    }

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.id
     *
     * @mbggenerated
     */
    private String id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.name
     *
     * @mbggenerated
     */
    private String name;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.phone
     *
     * @mbggenerated
     */
    private String phone;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.password
     *
     * @mbggenerated
     */
    private String password;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.company_id
     *
     * @mbggenerated
     */
    private String companyId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.department_id
     *
     * @mbggenerated
     */
    private String departmentId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.title
     *
     * @mbggenerated
     */
    private String title;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.category
     *
     * @mbggenerated
     */
    private Integer category;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.status
     *
     * @mbggenerated
     */
    private Integer status;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.token
     *
     * @mbggenerated
     */
    private String token;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column staff.create_time
     *
     * @mbggenerated
     */
    private String createTime;

    private String department_name;

    private String code;

    /**
     * 构造方法.
     *
     * @param json
     */
    public BaseStaff(String json) {
        super(json);
    }

    public String getDepartment_name() {
        if (null == department_name) {
            return (String) get("department_name");
        }
        return department_name;
    }

    public void setDepartment_name(String department_name) {
        this.put("department_name", department_name);
        this.department_name = department_name;
    }

    public String getCode() {
        if (null == code) {
            return (String) get("code");
        }
        return code;
    }

    public void setCode(String code) {
        this.put("code", code);
        this.code = code;
    }

    public String getId() {
        if (null == id) {
            return (String) get("id");
        }
        return id;
    }

    public void setId(String id) {
        this.put("id", id);
        this.id = id;
    }

    public String getName() {
        if (null == name) {
            return (String) get("name");
        }
        return name;
    }

    public void setName(String name) {
        this.put("name", name);
        this.name = name;
    }

    public String getPhone() {
        if (null == phone) {
            return (String) get("phone");
        }
        return phone;
    }

    public void setPhone(String phone) {
        this.put("phone", phone);
        this.phone = phone;
    }

    public String getPassword() {
        if (null == password) {
            return (String) get("password");
        }
        return password;
    }

    public void setPassword(String password) {
        this.put("password", password);
        this.password = password;
    }

    public String getCompanyId() {
        if (null == companyId) {
            return (String) get("companyId");
        }
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.put("companyId", companyId);
        this.companyId = companyId;
    }

    public String getDepartmentId() {
        if (null == departmentId) {
            return (String) get("departmentId");
        }
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.put("departmentId", departmentId);
        this.departmentId = departmentId;
    }

    public String getTitle() {
        if (null == title) {
            return (String) get("title");
        }
        return title;
    }

    public void setTitle(String title) {
        this.put("title", title);
        this.title = title;
    }

    public Integer getCategory() {
        if (null == category) {
            return (Integer) get("category");
        }
        return category;
    }

    public void setCategory(Integer category) {
        this.put("category", category);
        this.category = category;
    }

    public Integer getStatus() {
        if (null == status) {
            return (Integer) get("status");
        }
        return status;
    }

    public void setStatus(Integer status) {
        this.put("status", status);
        this.status = status;
    }

    public String getToken() {
        if (null == token) {
            return (String) get("token");
        }
        return token;
    }

    public void setToken(String token) {
        this.put("token", token);
        this.token = token;
    }

    public String getCreateTime() {
        if (null == createTime) {
            return (String) get("createTime");
        }
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.put("createTime", createTime);
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "BaseStaff{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", companyId='" + companyId + '\'' +
                ", departmentId='" + departmentId + '\'' +
                ", title='" + title + '\'' +
                ", category=" + category +
                ", status=" + status +
                ", token='" + token + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}